package org.pay.model;

public class PayRespData {

    /**
     *
     * {
     *     "ErrorCode": "000",
     *     "Message": "成功",
     *     "ResponseCode": "OK",
     *     "OrderNumber": "600000031735566077",
     *     "BillNumber": "DH2024123021411535688239143495202622089765720547",
     *     "PSP": 38,
     *     "TxType": "22",
     *     "LocalTime": "214120",
     *     "LocalDate": "20241230",
     *     "BuyerID": "130840413932698983",
     *     "Amount": 1000,
     *     "PSPName": "微信支付",
     *     "TransactionID": "600000031735566077",
     *     "ReceiptAmount": 1000,
     *     "Carrier": "None",
     *     "CouponAmount": 0,
     *     "UsePoint": 0,
     *     "RedeemDetail": null
     * }
     */
    // 錯誤碼 string Y 8 雷門交易閘道(附註 2)或支付服務商回傳錯誤碼
    private String ErrorCode;

    private String Message;

    // string Y 2 OK 表示交易成功，KO 表示交易失敗(錯誤原因參考 ErrorCode 及 Message 之內容)
    private String ResponseCode;

    //交易碼  string Y 50 交易成功產生的交易單號(退款用的交易單號)
    private String OrderNumber;

    // string Y 1024 消費者行動支付一維或二維條碼值
    private String BuyerID;

    //string Y 2 掃碼付款請填入 ‘22
    private String TxType = "22";

    //string Y 50 端末設備此筆交易之交易編號（正負交易皆不得重複）?
    private String BillNumber;


    //string Y 255 雷門交易閘道(附註 2)或支付服務商回傳交易訊息


     //string Y 50 支付服務商交易序號
    private String TransactionID;

     //string Y 2 支付服務商代碼（參考附註 1）
    private String PSP;

    //string Y 50 支付服務商中文名稱（參考附註 1）
    private String PSPName;

    //  int Y 10 交易含兩位小數但不包含小數點之金額。Ex: 交易 950 元，應填入 95000。
    private int Amount;

    //int Y 10 實際交易含兩位小數但不包含小數點之金額（發票應開立之金額）Ex: 商戶與支付服務商購買票券之行銷活動，例如折5 元，該票券折抵主要透過支付服務商後臺判斷，因
    //此雖 Amount 為 100 元，因達到該次行銷活動門檻，交易結果發票需要開立為 95 元。
    private int ReceiptAmount;

    //int Y 10 票券或是支付優惠金額。含兩位小數但不包含小數點
    private int CouponAmount;

    //string Y 8 支付服務商交易成立日期 (YYYYMMDD) Ex: 20211231
    private String LocalDate;

    //string Y 6 支付服務商交易成立時間 (hhmmss) Ex: 235959
    private String  LocalTime;

    // string Y 50 消費者於支付服務商綁定之發票載具條碼
    private String  Carrier;

    public PayRespData(String buyerID, String txType, String billNumber, String responseCode, String errorCode, String message, String orderNumber, String transactionID, String PSP, String PSPName, int amount, int receiptAmount, int couponAmount, String localDate, String localTime, String carrier) {
        BuyerID = buyerID;
        TxType = txType;
        BillNumber = billNumber;
        ResponseCode = responseCode;
        ErrorCode = errorCode;
        Message = message;
        OrderNumber = orderNumber;
        TransactionID = transactionID;
        this.PSP = PSP;
        this.PSPName = PSPName;
        Amount = amount;
        ReceiptAmount = receiptAmount;
        CouponAmount = couponAmount;
        LocalDate = localDate;
        LocalTime = localTime;
        Carrier = carrier;
    }

    public String getBuyerID() {
        return BuyerID;
    }

    public void setBuyerID(String buyerID) {
        BuyerID = buyerID;
    }

    public String getTxType() {
        return TxType;
    }

    public void setTxType(String txType) {
        TxType = txType;
    }

    public String getBillNumber() {
        return BillNumber;
    }

    public void setBillNumber(String billNumber) {
        BillNumber = billNumber;
    }

    public String getResponseCode() {
        return ResponseCode;
    }

    public void setResponseCode(String responseCode) {
        ResponseCode = responseCode;
    }

    public String getErrorCode() {
        return ErrorCode;
    }

    public void setErrorCode(String errorCode) {
        ErrorCode = errorCode;
    }

    public String getMessage() {
        return Message;
    }

    public void setMessage(String message) {
        Message = message;
    }

    public String getOrderNumber() {
        return OrderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        OrderNumber = orderNumber;
    }

    public String getTransactionID() {
        return TransactionID;
    }

    public void setTransactionID(String transactionID) {
        TransactionID = transactionID;
    }

    public String getPSP() {
        return PSP;
    }

    public void setPSP(String PSP) {
        this.PSP = PSP;
    }

    public String getPSPName() {
        return PSPName;
    }

    public void setPSPName(String PSPName) {
        this.PSPName = PSPName;
    }

    public int getAmount() {
        return Amount;
    }

    public void setAmount(int amount) {
        Amount = amount;
    }

    public int getReceiptAmount() {
        return ReceiptAmount;
    }

    public void setReceiptAmount(int receiptAmount) {
        ReceiptAmount = receiptAmount;
    }

    public int getCouponAmount() {
        return CouponAmount;
    }

    public void setCouponAmount(int couponAmount) {
        CouponAmount = couponAmount;
    }

    public String getLocalDate() {
        return LocalDate;
    }

    public void setLocalDate(String localDate) {
        LocalDate = localDate;
    }

    public String getLocalTime() {
        return LocalTime;
    }

    public void setLocalTime(String localTime) {
        LocalTime = localTime;
    }

    public String getCarrier() {
        return Carrier;
    }

    public void setCarrier(String carrier) {
        Carrier = carrier;
    }

    @Override
    public String toString() {
        return "PayRespData{" +
                "BuyerID='" + BuyerID + '\'' +
                ", TxType='" + TxType + '\'' +
                ", BillNumber='" + BillNumber + '\'' +
                ", ResponseCode='" + ResponseCode + '\'' +
                ", ErrorCode='" + ErrorCode + '\'' +
                ", Message='" + Message + '\'' +
                ", OrderNumber='" + OrderNumber + '\'' +
                ", TransactionID='" + TransactionID + '\'' +
                ", PSP='" + PSP + '\'' +
                ", PSPName='" + PSPName + '\'' +
                ", Amount=" + Amount +
                ", ReceiptAmount=" + ReceiptAmount +
                ", CouponAmount=" + CouponAmount +
                ", LocalDate='" + LocalDate + '\'' +
                ", LocalTime='" + LocalTime + '\'' +
                ", Carrier='" + Carrier + '\'' +
                '}';
    }
}
